package com.tsingteng.cosfun.ui.login;

import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.tsingteng.cosfun.R;
import com.tsingteng.cosfun.base.BasePresenterFragment;
import com.tsingteng.cosfun.bean.CommBackBean;
import com.tsingteng.cosfun.bean.ReportBean;
import com.tsingteng.cosfun.common.Navigate;
import com.tsingteng.cosfun.ui.login.report.ReportContract;
import com.tsingteng.cosfun.ui.login.report.ReportPresenter;
import com.tsingteng.cosfun.widget.MyRecycleView;

/**
 * 描述 : 启动页面
 * 创建人: 肖利.
 * 时间:2018/8/9
 * qq(872179966)
 */

public class SplashFragment extends BasePresenterFragment<ReportPresenter,ReportContract.IReportView> implements ReportContract.IReportView {

    public static SplashFragment newInstance() {
        SplashFragment fragment = new SplashFragment();
        return fragment;
    }

    private Handler handler = new Handler();
    @Override
    protected void initView() {
        super.initView();
        handler.postDelayed(() -> {
            Navigate.startMain(getContext(),false);
            getActivity().finish();
        },2000);
    }

    @Override
    protected void getBundle(Bundle bundle) {

    }

    @Override
    protected void initData(View rootView) {




    }

    @Override
    protected ReportPresenter createPresenter() {
        return new ReportPresenter();
    }

    @Override
    protected View initHeader() {
        return null;
    }

    @Override
    protected MyRecycleView createRecycleView() {
        return null;
    }

    @Override
    protected BaseQuickAdapter createAdapter() {
        return null;
    }

    @Override
    protected void refresh() {

    }

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_splash;
    }

    @Override
    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {

    }

    @Override
    public void onLoadMoreRequested() {

    }

    @Override
    public void showReportData(ReportBean data) {
        Log.e("登陆上报",data.toString());
    }

    @Override
    public void showReadCount(ReportBean data) {

    }

    @Override
    public void showReadAll() {

    }

    @Override
    public void showFollowCount(CommBackBean commBackBean) {

    }

}
